package com.fd.servlet;

import com.fd.service.IStudentService;
import org.junit.runner.RunWith;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

////创建容器
//@RunWith(SpringJUnit4ClassRunner.class)
////指定创建容器时使用哪个配置文件
//@ContextConfiguration("classpath:applicationContext-ann.xml")
//public class StudentService {
//
////        ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("applicationContext-ann.xml");
////        IStudentService studentService = classPathXmlApplicationContext.getBean(IStudentService.class);
//private static IStudentService getiStudentService() {
//    ClassPathXmlApplicationContext classPathXmlApplicationContext = new ClassPathXmlApplicationContext("applicationContext-jdbc-ann.xml");
//    IStudentService studentService = classPathXmlApplicationContext.getBean(IStudentService.class);
//    return studentService;
//}
//    }

